﻿namespace Lzhdim.WinSrvMgr
{
    using Lzhdim.WinSrvMgr.Forms;
    using System;

    /// <summary>
    /// 窗体管理器库
    /// </summary>
    internal sealed class Windows
    {
        /// <summary>
        /// 单例模式，保存窗体对象
        /// </summary>
        private static readonly Lazy<Windows> _Lazy = new Lazy<Windows>(() => new Windows());

        private WndAbout _AboutForm = null;

        private WndMain _MainForm = new WndMain();

        private WndUseHelp _UseHelpForm = null;

        private Windows()
        {
        }

        internal static Windows Instance => _Lazy.Value;

        /// <summary>
        /// 关于窗体
        /// </summary>
        internal WndAbout AboutForm
        {
            get => Instance._AboutForm;
            set => Instance._AboutForm = value;
        }

        /// <summary>
        /// 主窗体
        /// </summary>
        internal WndMain MainForm
        {
            get => Instance._MainForm;
            set => Instance._MainForm = value;
        }

        /// <summary>
        /// 使用帮助窗体
        /// </summary>
        internal WndUseHelp UseHelpForm
        {
            get => Instance._UseHelpForm;
            set => Instance._UseHelpForm = value;
        }
    }
}